﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
using BLL;
namespace PhongMachTu.GUI
{
    public partial class frmReportDanhSachKham : Form
    {
        public frmReportDanhSachKham()
        {
            InitializeComponent();
            for (int i = 1; i <= 12; i++)
            {
                cmbThang.Items.Add(i);
            }
            cmbThang.Text = DateTime.Now.Month.ToString();
        }

        private void frmReportDanhSachKham_Load(object sender, EventArgs e)
        {
            this.reportViewer1.RefreshReport();

        }
        int Month = DateTime.Now.Month;
        KhambenhBLL bllKB = new KhambenhBLL();
        private void btnIn_Click(object sender, EventArgs e)
        {
            BENHNHANBindingSource.DataSource = bllKB.LayDSKhamBenh(Month);
            this.reportViewer1.RefreshReport();
        }

        private void cmbThang_SelectedIndexChanged(object sender, EventArgs e)
        {
            Month = int.Parse(cmbThang.Text);
        }
    }
}
